# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


class SpiderItem(scrapy.Item):
    # define the fields for your item here like:
    name = scrapy.Field()

class ChannelItem(scrapy.Item):
    #{'id': 22, 'name': '星海', 'channel_count': '7'}]
    id = scrapy.Field()
    name = scrapy.Field()
    channel_count = scrapy.Field()

class subChannelItem(scrapy.Item):
    #"cover": "http://i0.hdslb.com/bfs/tag/45240e388fed8caddfb367d38f914d2d7d4b2d1a.png",
    #"background": "http://i0.hdslb.com/bfs/tag/79f4cfb011d000fa9c88b3f3f1e785aa4c58d299.jpg",
    #"subscribed_count": 191792,
    #"archive_count": "1.4万",
    #"featured_count": 180,
    #"archives": [
    # archives
    pid = scrapy.Field()  #保存父频道
    id = scrapy.Field()
    name = scrapy.Field()
    cover = scrapy.Field()
    subscribed_count= scrapy.Field()
    archive_count = scrapy.Field()
    featured_count = scrapy.Field()
    video_id = scrapy.Field()
    #archives = scrapy.Field()#是一个list，如果存入数据库会保存不了
    video_name = scrapy.Field()
    video_cover = scrapy.Field()
    video_view = scrapy.Field()
    video_like = scrapy.Field()
    video_time = scrapy.Field()
    video_author_name = scrapy.Field()
    video_author_id = scrapy.Field()
    video_bvid = scrapy.Field()


class CommentItem(scrapy.Item):
    #"all_count": 2476,
    #"is_begin": true,
    #"prev": 1,
    #"next": 2,
    #"is_end": false,
    #"mode": 3,
    #"show_type": 1,
    #"support_mode": [1, 2, 3],
    #"name": "热门评论"
    like = scrapy.Field()
    uname = scrapy.Field()
    sex = scrapy.Field()
    level = scrapy.Field()
    content = scrapy.Field()
    all_count = scrapy.Field()
    name = scrapy.Field()

class hot_video_lItem(scrapy.Item):
    tid = scrapy.Field()
    tname = scrapy.Field()
    title = scrapy.Field()
    view = scrapy.Field()
    danmaku = scrapy.Field()
    favorite = scrapy.Field()
    coin = scrapy.Field()
    like = scrapy.Field()
    share = scrapy.Field()



class VideoItem(scrapy.Item):
    cid = scrapy.Field()
    scid = scrapy.Field()
    id = scrapy.Field()
    name = scrapy.Field()
    cover = scrapy.Field()
    view_count = scrapy.Field() # 播放数
    like_count = scrapy.Field() # 点赞数
    duration = scrapy.Field()
    author_name = scrapy.Field()
    author_id = scrapy.Field()
    bvid = scrapy.Field()
    card_type = scrapy.Field()
    sort1 = scrapy.Field()
    filt = scrapy.Field()
    pubdate = scrapy.Field()
    danmu_count = scrapy.Field()
    coins_count = scrapy.Field()    # 投币数
    collect_count = scrapy.Field()  # 收藏数
    share_count = scrapy.Field()    # 分享数

